import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '专利作者',
    align: "center",
    dataIndex: 'patentAuthor'
  },
  {
    title: '专利领域类型',
    align: "center",
    dataIndex: 'patentField_dictText'
  },
  {
    title: '专利类型',
    align: "center",
    dataIndex: 'patentType_dictText'
  },
  {
    title: '专利标题',
    align: "center",
    dataIndex: 'patentTitle'
  },
  {
    title: '专利图片',
    align: "center",
    dataIndex: 'imageurl',
    customRender: render.renderImage,
  },
  {
    title: '专利号',
    align: "center",
    dataIndex: 'patentNumber'
  },
  {
    title: '授权公告号',
    align: "center",
    dataIndex: 'announcementNumber'
  },
  {
    title: '专利授权证书文件路径或证书编号',
    align: "center",
    dataIndex: 'patentCertificate',
  },
  {
    title: '授权时间',
    align: "center",
    dataIndex: 'authorizationDate',
    customRender:({text}) =>{
      text = !text ? "" : (text.length > 10 ? text.substr(0,10) : text);
      return text;
    },
  },

  {
    title: '关联企业',
    align: "center",
    dataIndex: 'companyId_dictText'
  },
  {
    title: '申请日期 ',
    align: "center",
    dataIndex: 'applyDate',
    customRender:({text}) =>{
      text = !text ? "" : (text.length > 10 ? text.substr(0,10) : text);
      return text;
    },
  },
  {
    title: '公开日期',
    align: "center",
    dataIndex: 'publicDate',
    customRender:({text}) =>{
      text = !text ? "" : (text.length > 10 ? text.substr(0,10) : text);
      return text;
    },
  },
  {
    title: '轮播图状态',
    align: "center",
    dataIndex: 'slider_dictText',
  },
  {
    title: '专利状态',
    align: "center",
    dataIndex: 'patentStatus_dictText'
  },
];

// 高级查询数据
export const superQuerySchema = {
  patentAuthor: {title: '专利作者',order: 0,view: 'text', type: 'string',},
  patentField: {title: '专利领域类型',order: 1,view: 'list', type: 'string',dictCode: 'patent_type',},
  patentType: {title: '专利类型',order: 2,view: 'list', type: 'string',dictCode: 'patent_field_type',},
  patentTitle: {title: '专利标题',order: 3,view: 'text', type: 'string',},
  imageurl: {title: '专利图片',order: 4,view: 'image', type: 'string',},
  patentAbstract: {title: '专利摘要',order: 5,view: 'umeditor', type: 'string',},
  patentNumber: {title: '专利号',order: 6,view: 'text', type: 'string',},
  announcementNumber: {title: '授权公告号',order: 7,view: 'text', type: 'string',},
  patentCertificate: {title: '专利授权证书文件路径或证书编号',order: 8,view: 'file', type: 'string',},
  authorizationDate: {title: '授权时间',order: 9,view: 'date', type: 'string',},
};
